{% extends "base_generic.html" %}
{% block script %}
<script type="text/javascript">
function generateUrl(name) {
  var sanitizedName = string_to_slug(name);
  $("#url").val(sanitizedName);
}

$(window).load(
    function() {
      cleanStyles('#description');
      $('textarea.textile').markItUp(mySettings);
    });

</script>
{% endblock %}
{% block content %}
<h1>Categoría del blog</h1>
<form name="edit-admin" id="edit-admin" method="post" action="{{path}}">
<div class="field">
<label for="name">Nombre:</label>
<input type="text" name="name" id="name" value="{{articlecategory.name}}" onblur="generateUrl($('#name').val())" />
</div>
<div class="field">
<label for="url">URL:</label>
<input type="text" name="url" id="url" value="{{articlecategory.url}}" />
</div>
<div style="clear:both" class="field">
<label for="description">Descripcion:</label>
<textarea name="description" rows="5" cols="45" id="description">{{articlecategory.description}}</textarea>
</div>
<br class="clear" />

<input type="submit" name="save" id="publish" value="Save" />
<br class="clear" />
</form>
{% endblock %}
